import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import common from './modules/common'
import tags from './modules/tags'
import getters from './getters'
import table from './modules/table'
import dic from './modules/dic'
import LoadingPlugin from '@/util/vuex-loading-plugin'

Vue.use(Vuex)
const store = new Vuex.Store({
    modules: {
        user,
        common,
        tags,
        table,
        dic
    },
    getters,
    plugins: [
        LoadingPlugin({
            observe: ['table/GetTableData', 'table/GetDetailData', 'table/saveDetailData']
        })
    ]
})

export default store
